﻿using System;
using System.ComponentModel;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using SUMO.MediaBrowser.ViewModel;

namespace SUMO.MediaBrowser.Controls
{
    /// <summary>
    /// Represents UI for editing a media item
    /// </summary>
    public interface IMediaItemEditor
    {
        /// <summary>
        /// The underlying item in progress of being edited
        /// </summary>
        EditingHierarchicalMediaItem DataItem { get; set; }

        /// <summary>
        /// Instructs the control to present its UI to the user for editing of the media item
        /// </summary>
        void Show();

        /// <summary>
        /// Occurs when the control is being closed, and offers the ability for the close event to be cancelled. Useful for preview or reversion.
        /// </summary>
        event EventHandler<CancelEventArgs> Closing;
        
        /// <summary>
        /// Occurs after the control has been closed and is no longer displayed to the user. Useful for persisting data.
        /// </summary>
        event EventHandler Closed;

        /// <summary>
        /// Represents the state of user commitment.
        /// A value of true means that the user has confirmed the actions, whereas false means the user has cancelled their actions.
        /// null implies the user has not yet finished or decided on the value of their actions
        /// </summary>
        bool? UserCommitResult { get; }
    }
}
